module.exports = app => {
    class Controller extends app.Controller {
        async ping() {
            console.log('来了老弟');
            const message = this.ctx.args[0];
            await this.ctx.socket.emit('res', `Hi! I've got your message: ${message}`);
        }
        async hello() {
            console.log('来了老弟');
            const message = this.ctx.args[0];
            await this.ctx.socket.emit('res', `Hi! I've got your message: ${message}`);
        }
    }
    return Controller
};

// // or async functions
// exports.ping = async function () {
//     const message = this.args[0];
//     await this.socket.emit('res', `Hi! I've got your message: ${message}`);
// };